package de.koller.retrograde.response;

import de.koller.aframe.util.web.basicHTML.BasicWebServer;
import de.koller.aframe.util.web.basicHTML.HTMLPage;

public class HomePage extends HTMLPage {

	public HomePage( BasicWebServer webroot ) {
		super( webroot );
	}

	@Override
	protected String getPageTitle() {
		return "Moment-Home";
	}

	@Override
	protected String getHeader() {
		return  "<style>" +
					"table {" +
						"border-collapse:collapse;" +
					"}" +
					"td, th {" +
						"padding:0px;" +
						"margin:0px;" +
						"border:0px;" +
					"}" +
					"img {" +
						"padding:0px;" +
						"margin:0px;" +
						"border:0px;" +
					"}" +
				"</style>";
	}

	@Override
	protected String getBody() {
		String[][] grid = new String[ 20 ][ 35 ];
		for( int x = 0; x < grid.length; x++ )
			for( int y = 0; y < grid[0].length; y++ )
				grid[x][y] = image( "/img_tile_" + x + "_" + y, 32, 32 );
		return table( grid, 0 );
	}
	
	
	
}
